package request

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	common_request "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
)

// CommunityListRequest 获取社区列表请求

type CommunityListRequest struct {
	Page                 int    `json:"page" binding:"required,gte=1"`             // 页码
	PageSize             int    `json:"pageSize" binding:"required,gte=1,lte=100"` // 每页大小
	Keyword              string `json:"keyword"`                                   // 搜索关键词
	Type                 int8   `json:"type" default:"-1"`                         // 社区类型：-1不筛选，0虚拟社区，1物理社区
	DisciplineCategoryID int64  `json:"disciplineCategoryId" default:"0"`          // 学科类别ID
	MajorCategoryID      int64  `json:"majorCategoryId" default:"0"`               // 专业类别ID
}

// JoinCommunityRequest 加入社区请求

type JoinCommunityRequest struct {
	CommunityID uint `json:"communityId" binding:"required,gte=1"` // 社区ID
}

// LeaveCommunityRequest 离开社区请求

type LeaveCommunityRequest struct {
	CommunityID uint `json:"communityId" binding:"required,gte=1"` // 社区ID
}

type GetDisciplineCommunityContentRequest struct {
	CommunityID uint                    `json:"communityId" binding:"required"`
	Type        global.ContentType      `json:"type"`
	PageInfo    common_request.PageInfo `json:"pageInfo"`
}
